import request from '@/utils/request'

// 查询演讲嘉宾列表
export function listExpertr(query) {
  return request({
    url: '/expert/list',
    method: 'get',
    params: query
  })
}

// 新增演讲嘉宾
export function addExpert(data) {
  return request({
    url: '/expert',
    method: 'post',
    data: data
  })
}

// 更新演讲嘉宾
export function updateExpert(data) {
  return request({
    url: '/expert/update',
    method: 'post',
    data: data
  })
}

// 删除单个演讲嘉宾
export function delExpert(userId) {
  return request({
    url: '/expert/' + userId,
    method: 'delete'
  })
}

// 获取单个详情
export function getExpert(id) {
  return request({
    url: '/expert/' + id,
    method: 'get'
  })
}
